package com.ssm.service.user;

import com.ssm.pojo.User;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

public interface UserService {
    //用户登录
    public User login(User user);
    //用户登录验证
    public boolean loginVerify(String userCode, String userPassword);
    //查询用户数
    public int getUserCount(String userName,Integer userRole) throws SQLException;
    //根据条件查询用户列表
    public List<User> getUserList(String userName, Integer userRole, int offset, int pageSize);
    //根据ID获取用户
    public User getUserById(Integer userId) ;
    //根据userCode获取用户
    public User getUserByUserCode(String userCode);
    //添加一个用户
    public int addUser(User user);
    //删除一个用户
    public int deleteUserById(Integer userId) throws SQLException;
    //修改用户信息
    public int modifyUser(User user) throws SQLException;
    //根据用户ID修改密码
    public int updatePwd(Integer id, String newPwd) throws SQLException;
}
